package configClient;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.Objects;

/**
 * 配置 key 源信息
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ConfigMetaInfo {

    /**
     * key 版本号
     */
    private Long version;

    /**
     * key创建时间
     */
    private Date createTime;


    /**
     * key修改时间
     */
    private Date updateTime;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ConfigMetaInfo that = (ConfigMetaInfo) o;
        return Objects.equals(version, that.version) && Objects.equals(createTime, that.createTime) && Objects.equals(updateTime, that.updateTime);
    }

}
